import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class NoAcDegreeFlowBean implements Writable{
    //封装flowbean
    private String job_city;
    private String job_title;
    private String job_sub_title;
    private String min_edu_level;
    private long max_salary;

    public void set(String job_city, String job_title, String job_sub_title,long max_salary,String min_edu_level) {
        this.job_city = job_city;
        this.job_title = job_title;
        this.job_sub_title = job_sub_title;
        this.max_salary = max_salary;
        this.min_edu_level = min_edu_level;
    }

    //空参构造，为了后续反射用
    public NoAcDegreeFlowBean() {
        super();
    }


    //序列化
    @Override
    public void write(DataOutput out) throws IOException {
        out.writeUTF(job_city);
        out.writeUTF(job_title);
        out.writeUTF(job_sub_title);
        out.writeLong(max_salary);
        out.writeUTF(min_edu_level);

    }

    //反序列化
    @Override
    public void readFields(DataInput in) throws IOException {
        job_city = in.readUTF();
        job_title = in.readUTF();
        job_sub_title = in.readUTF();
        max_salary = in.readLong();
        min_edu_level = in.readUTF();
    }

    public String getJob_city() {

        return job_city;
    }

    public void setJob_city(String job_city) {

        this.job_city = job_city;
    }

    public String getJob_title() {

        return job_title;
    }

    public void setJob_title(String job_title) {

        this.job_title = job_title;
    }
    public String getJob_sub_title() {

        return job_sub_title;
    }

    public void setJob_sub_title(String job_sub_title) {
        this.job_sub_title = job_sub_title;
    }

    public long getMax_salary() {

        return max_salary;
    }

    public void setMax_salary(long max_salary) {

        this.max_salary = max_salary;
    }
    public String getMin_edu_level() {

        return min_edu_level;
    }

    public void setMin_edu_level(String min_edu_level) {
        this.min_edu_level = min_edu_level;
    }

    @Override
    public String toString() {
        return job_city +
                "\t" + job_title + "\t" + job_sub_title + "\t" +max_salary ;
    }


}
